package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.GrantType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysSuppliergoodsimplowerMapper;
import com.ruoyi.system.domain.SysSuppliergoodsimplower;
import com.ruoyi.system.service.ISysSuppliergoodsimplowerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 供应商货物授权Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-13
 */
@Service
public class SysSuppliergoodsimplowerServiceImpl implements ISysSuppliergoodsimplowerService 
{
    @Autowired
    private SysSuppliergoodsimplowerMapper sysSuppliergoodsimplowerMapper;

    /**
     * 查询供应商货物授权
     * 
     * @param supplierGoodsImplowerId 供应商货物授权ID
     * @return 供应商货物授权
     */
    @Override
    public SysSuppliergoodsimplower selectSysSuppliergoodsimplowerById(Long supplierGoodsImplowerId)
    {
        return sysSuppliergoodsimplowerMapper.selectSysSuppliergoodsimplowerById(supplierGoodsImplowerId);
    }
    @Override
    public List<GrantType> selectGrantTypeList(SysSuppliergoodsimplower sysSuppliergoodsimplower){
        return sysSuppliergoodsimplowerMapper.selectGrantTypeList(sysSuppliergoodsimplower);
    }
    /**
     * 查询供应商货物授权列表
     * 
     * @param sysSuppliergoodsimplower 供应商货物授权
     * @return 供应商货物授权
     */
    @Override
    public List<SysSuppliergoodsimplower> selectSysSuppliergoodsimplowerList(SysSuppliergoodsimplower sysSuppliergoodsimplower)
    {
        return sysSuppliergoodsimplowerMapper.selectSysSuppliergoodsimplowerList(sysSuppliergoodsimplower);
    }

    /**
     * 新增供应商货物授权
     * 
     * @param sysSuppliergoodsimplower 供应商货物授权
     * @return 结果
     */
    @Override
    public int insertSysSuppliergoodsimplower(SysSuppliergoodsimplower sysSuppliergoodsimplower)
    {
        sysSuppliergoodsimplower.setCreateTime(DateUtils.getNowDate());
        return sysSuppliergoodsimplowerMapper.insertSysSuppliergoodsimplower(sysSuppliergoodsimplower);
    }

    /**
     * 修改供应商货物授权
     * 
     * @param sysSuppliergoodsimplower 供应商货物授权
     * @return 结果
     */
    @Override
    public int updateSysSuppliergoodsimplower(SysSuppliergoodsimplower sysSuppliergoodsimplower)
    {
        return sysSuppliergoodsimplowerMapper.updateSysSuppliergoodsimplower(sysSuppliergoodsimplower);
    }

    /**
     * 删除供应商货物授权对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysSuppliergoodsimplowerByIds(String ids)
    {
        return sysSuppliergoodsimplowerMapper.deleteSysSuppliergoodsimplowerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除供应商货物授权信息
     * 
     * @param supplierGoodsImplowerId 供应商货物授权ID
     * @return 结果
     */
    @Override
    public int deleteSysSuppliergoodsimplowerById(Long supplierGoodsImplowerId)
    {
        return sysSuppliergoodsimplowerMapper.deleteSysSuppliergoodsimplowerById(supplierGoodsImplowerId);
    }
}
